﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Model;
using System.Collections.ObjectModel;

namespace University.Workshop.DataAccess
{
    public static class CalendarDataAccess
    {
        static MedicalCenterEntities entities = MedicalCenterEntities.Instance;

        public static ICollection<Calendar> GetCalendarByMonth(string month)
        {
            if (!string.IsNullOrEmpty(month))
            {
                var calendars = from calendar in entities.Calendars
                                where calendar.Month == month
                                orderby calendar.CalendarId ascending
                                select calendar;
                return calendars.ToList();
            }
            return null;
        }
    }
}
